<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<div id="log"></div>
<script>
// 
test(() => {
    assert_selection(
        [
            '<div contenteditable>',
            '<div><span style="background-color: rgb(255, 0, 0);">one</span></div>',
            '<div>^<span style="background-color: rgb(255, 0, 0);">two</span></div>',
            '<div><span style="background-color: rgb(255, 0, 0);">three</span>|</div>',
            '<div><span style="background-color: rgb(255, 0, 0);">four</span></div>',
            '</div>',
        ].join(''),
        'Indent',
        [
            '<div contenteditable>',
            '<div><span style="background-color: rgb(255, 0, 0);">one</span></div>',
            '<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">',
            '<div><span style="background-color: rgb(255, 0, 0);">^two</span></div>',
            '<div><span style="background-color: rgb(255, 0, 0);">three|</span></div>',
            '</blockquote>',
            '<div><span style="background-color: rgb(255, 0, 0);">four</span></div>',
            '</div>',
        ].join(''),
        'https://wkb.ug/23995');

    assert_selection(
        [
            '<div contenteditable>|one',
            '<div><span style="background-color: rgb(255, 0, 0);">two</span> three</div>',
            '<div>four<span style="background-color: rgb(255, 0, 0);">five</span></div>',
            '<div><span style="background-color: rgb(255, 0, 0);">four</span></div>',
            '<ul><li><b>foo</b>bar</li></ul>',
            '<span style="background-color: rgb(255, 0, 0);"><font color="#3333FF">five</font></span> six <b><i>seven</i></b>',
            '</div>',
        ].join(''),
        'Indent',
        [
            '<div contenteditable>',
            '<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">|one</blockquote>',
            '<div><span style="background-color: rgb(255, 0, 0);">two</span> three</div>',
            '<div>four<span style="background-color: rgb(255, 0, 0);">five</span></div>',
            '<div><span style="background-color: rgb(255, 0, 0);">four</span></div>',
            '<ul><li><b>foo</b>bar</li></ul>',
            '<span style="background-color: rgb(255, 0, 0);"><font color="#3333FF">five</font></span> six <b><i>seven</i></b>',
            '</div>',
        ].join(''),
        'http://wkb.ug/32233 http://wkb.ug/32843');
});
</script>
